package com.qf.shopping.service.impl;

import com.qf.shopping.pojo.message.Area;
import com.qf.shopping.service.IAreaService;
import com.qf.shopping.mapper.message.AreaMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Author 82024
 * @Date 2019/4/19 23:19
 * @Version 1.0
 * @Description
 **/
public class AreaServiceImpl implements IAreaService {

    @Autowired
    private AreaMapper areaMapper = null;

    @Override
    public void addArea(Area area) {
        areaMapper.addArea(area);
    }

    @Override
    public void updateAreaById(Long id) {
        Area area = areaMapper.findAreaById(id);
        areaMapper.updateArea(area);
    }

    @Override
    public void deleteAreaById(Long id) {
        areaMapper.deleteAreaById(id);
    }

    @Override
    public Area findAreaById(Long id) {
        return areaMapper.findAreaById(id);
    }

    @Override
    public List<Area> findAllArea() {
        return areaMapper.findAllArea();
    }
}
